package com.swanclouds.redfish.chassis.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.redfish.common.redfish.Status;

/**
 * Author: HuangFuYuHui
 * Title: Voltages
 * Description: 电压传感器
 * Date: 2022/7/21 14:39
 */
public class Voltages {

    /**指定电压传感器的访问路径**/
    @JsonProperty("@odata.id")
    private String dataId;

    /**指定电压传感器的ID，为
     其在电压传感器列表中的
     唯一标识。**/
    @JsonProperty("MemberId")
    private String memberId;

    /**指定电压传感器的名称**/
    @JsonProperty("Name")
    private String name;

    /**指定电压传感器的序号**/
    @JsonProperty("SensorNumber")
    private String sensorNumber;

    /**指定电压传感器的状态，
     包括：
     ● Health：电压传感器健
     康状态
     ● State：电压传感器使
     能状态
     ● Severity：电压传感器
     的自定义健康状态**/
    @JsonProperty("Status")
    private Status status;

    /**指定电压传感器的当前读数**/
    @JsonProperty("ReadingVolts")
    private String readingVolts;

    /**指定电压传感器的高压轻微告警阈值**/
    @JsonProperty("UpperThresholdNonCritical")
    private String upperThresholdNonCritical;

    /**指定电压传感器的高压严重告警阈值**/
    @JsonProperty("UpperThresholdCritical")
    private String upperThresholdCritical;

    /**指定电压传感器的高压紧急告警阈值**/
    @JsonProperty("UpperThresholdFatal")
    private String upperThresholdFatal;

    /**指定电压传感器的低压轻微告警阈值**/
    @JsonProperty("LowerThresholdNonCritical")
    private String lowerThresholdNonCritical;

    /**指定电压传感器的低压严重告警阈值**/
    @JsonProperty("LowerThresholdCritical")
    private String lowerThresholdCritical;

    /**指定电压传感器的低压紧急告警阈值**/
    @JsonProperty("LowerThresholdFatal")
    private String lowerThresholdFatal;

    /**指定电压传感器可读取的最低电压**/
    @JsonProperty("MinReadingRange")
    private String minReadingRange;

    /**指定电压传感器可读取的最高电压**/
    @JsonProperty("MaxReadingRange")
    private String maxReadingRange;

    public String getDataId() {
        return dataId;
    }

    public String getMemberId() {
        return memberId;
    }

    public String getName() {
        return name;
    }

    public String getSensorNumber() {
        return sensorNumber;
    }

    public Status getStatus() {
        return status;
    }

    public String getReadingVolts() {
        return readingVolts;
    }

    public String getUpperThresholdNonCritical() {
        return upperThresholdNonCritical;
    }

    public String getUpperThresholdCritical() {
        return upperThresholdCritical;
    }

    public String getUpperThresholdFatal() {
        return upperThresholdFatal;
    }

    public String getLowerThresholdNonCritical() {
        return lowerThresholdNonCritical;
    }

    public String getLowerThresholdCritical() {
        return lowerThresholdCritical;
    }

    public String getLowerThresholdFatal() {
        return lowerThresholdFatal;
    }

    public String getMinReadingRange() {
        return minReadingRange;
    }

    public String getMaxReadingRange() {
        return maxReadingRange;
    }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
        }
        return "Voltages{" +
                "@odata.id='" + dataId + '\'' +
                "Name='" + name + '\'' +
                "MemberId='" + memberId + '\'' +
                "Status='" + status + '\'' +
                "ReadingVolts='" + readingVolts + '\'' +
                "UpperThresholdNonCritical='" + upperThresholdNonCritical + '\'' +
                "UpperThresholdCritical='" + upperThresholdCritical + '\'' +
                "UpperThresholdFatal='" + upperThresholdFatal + '\'' +
                "LowerThresholdNonCritical='" + lowerThresholdNonCritical + '\'' +
                "SensorNumber='" + sensorNumber + '\'' +
                "LowerThresholdCritical='" + lowerThresholdCritical + '\'' +
                "LowerThresholdFatal='" + lowerThresholdFatal + '\'' +
                "MinReadingRange='" + minReadingRange + '\'' +
                "MaxReadingRange='" + maxReadingRange + '\'' +
                '}';
    }
}
